<script setup>
import { ref } from 'vue';


const msg = ref('我是子组件')

const showAlert = () => {
    alert('大家好')
}

defineExpose({
    msg,
    showAlert
})
</script>

<template>
    <div>
        {{ msg }}
    </div>
</template>

<style scoped></style>